import { defineStore } from "pinia";
import { getSearchConditions, getSearchHouse } from "../../services/modules/searchRequest";

export default defineStore("search", {
    // 数据
    state: () => ({
        searchConditions: {},
        searchHouse: {}
    }),
    // 操作
    actions: {
        async fetchSearchConditions() {
            const res = await getSearchConditions()
            this.searchConditions = res.data
        },
        async fetchSearchHouse() {
            const res = await getSearchHouse()
            this.searchHouse = res.data
        }
    }
})